home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
xlock
/
sco_passwd.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-05-09
|
721b
|
35 lines
#include <sys/types.h>
#include <sys/security.h>
#include <prot.h>
#include <pwd.h>
#include <stdio.h>
#ifdef SecureWare
/*
* Get the ``protected password database'' information for a user,
* and fish their encrypted password from it. This program must be
* setgid ``auth'' for this to work.
*/
struct passwd *
sco_getpwnam (user)
char *user;
{
struct passwd *pwd;
struct pr_passwd *pr_pwd;
if ((pwd = getpwnam (user)) == (struct passwd *) NULL)
{
return ((struct passwd *) NULL);
}
if ((pr_pwd = getprpwnam (user)) == (struct pr_passwd *) NULL)
{
return ((struct passwd *) NULL);
}
pwd->pw_passwd = pr_pwd->ufld.fd_encrypt;
return (pwd);
}
#endif /* SecureWare */